Click or drag to resize

ResourceUploadFile Method (String, String, Int32, ContentRange)

Uploads a local file to a resource with the specified URI.

Namespace:  Independentsoft.Webdav
Assembly:  Independentsoft.Webdav (in Independentsoft.Webdav.dll) Version: 1.0.700.18437
Syntax
public FileUpload UploadFile(
	string address,
	string fileName,
	int bufferSize,
	ContentRange contentRange
)

Parameters

address
Type: SystemString
The URI of the resource to receive the file.
fileName
Type: SystemString
The file to send to the resource.
bufferSize
Type: SystemInt32
The buffer size. Default value is 8192 bytes.
contentRange
Type: Independentsoft.WebdavContentRange
The content range.

Return Value

Type: FileUpload
Examples
The following example demonstrates how to use this method:
//Upload file
public void Upload()
{
    resource.UploadProgress += new UploadProgressEventHandler(UploadProgress);
    resource.UploadFile(remoteFile, localFile);
}

//Display progress
private void UploadProgress(Object sender,ProgressEventArgs e)
{
    Console.WriteLine(e.Progress);
}
See Also